import datetime
import time

import requests


query_start_time = datetime.datetime(1979, 1, 1, 0, tzinfo=datetime.timezone.utc).timestamp()
query_start_time = int(query_start_time)
query_stop_time = datetime.datetime(1979, 1, 1, 0, 1, tzinfo=datetime.timezone.utc).timestamp()
query_stop_time = int(query_stop_time)

url = "http://localhost:8080/query"
start = time.time()
response = requests.get(url, params={
    "variable": "Temperature",
    "pressure_level": "1",
    "time_start": query_start_time,
    "time_stop": query_stop_time,
    "longitude_start": "73.5",
    "longitude_stop": "135",
    "latitude_start": "53.5",
    "latitude_stop": "4",
})
print(response.status_code, response.content)
print(time.time() - start)
